package com.example.his.api.mis.controller.form.permission;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class SearchPermissionByPageForm {
  
  @Pattern(regexp = "^[A-Z:]{1,50}$", message = "permissionName格式错误")
  private String permissionName;
  
  //  @Min(value = 0, message = "moduleId不能小于0")
  //  private int moduleId;
  //
  //  @Min(value = 0, message = "actionId不能小于0")
  //  private int actionId;
  
  @NotNull(message = "page不能为空")
  @Min(value = 1, message = "page不能小于1")
  private Integer page;
  
  @NotNull(message = "length不能为空")
  @Range(min = 10, max = 100, message = "length必须在10~100之间")
  private Integer length;
}
